package cn.accp.mvc.dao.impl;

import java.util.List;

import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import cn.accp.mvc.dao.TypesDao;
import cn.accp.mvc.entity.Types;

@Repository("typesDao")
public class TypesDaoImpl extends SqlSessionDaoSupport implements TypesDao {
	@Autowired
	@Override
	public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) {
		super.setSqlSessionFactory(sqlSessionFactory);
	}
	
	@Override
	public List<Types> getAllTypes() {
		List<Types> typesList = getSqlSession().selectList("getTypes");
		return typesList;
	}

}
